import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { NavBar, Search, Field, Button, Form, Notify, Tabbar, TabbarItem, Icon, Tab, Tabs, Cell, List, PullRefresh, ActionSheet, Popup, Row, Col, Badge } from 'vant'
import { allChannelListAPI } from '@/api'
import directive from '@/utils/directives.js'
import 'amfe-flexible'
Vue.use(directive)
Vue.use(Search)

Vue.use(Badge)
Vue.use(Row)
Vue.use(Col)
Vue.use(Popup)
Vue.use(ActionSheet)
Vue.use(PullRefresh)
Vue.use(List)
Vue.use(Cell)
Vue.use(Tab)
Vue.use(Tabs)
Vue.use(Icon)
Vue.use(Tabbar)
Vue.use(TabbarItem)

Vue.use(Notify)
Vue.use(Form)
Vue.use(Field)
Vue.use(Button)
Vue.use(Field)
Vue.use(NavBar) // 移动端适配插件
Vue.config.productionTip = false
async function myFn () {
  try {
    const res = await allChannelListAPI()
    console.log(res)
  } catch (err) {
    console.log('错误了哦~err~~' + err)
  }
  // const res = await allChannelListAPI()
  // console.log(res)
}
myFn()

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
